﻿using System;
using Furion;
using PMP.Core.Extensions;
using SqlSugar;

namespace PMP.Core.Entities;


/// <summary>
/// 基础实体类
/// </summary>
public abstract class BaseEntity
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
    public int Id { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建用户Id
    /// </summary>
    public int CreateUserId { get; set; } = App.User.GetUserId();
    public string CreateUserName { get; set; } = App.User.GetRealName();

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime UpdateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新用户Id
    /// </summary>
    public int UpdateUserId { get; set; } = App.User.GetUserId();
    public string UpdateUserName { get; set; } = App.User.GetRealName();

}